// import {GETDARK, SETDARK} from "@/utils/local"
import {defineStore} from "pinia"
import {reactive, ref} from "vue"

export const useAuthStore = defineStore(
    "auth",
    () => {

        const authInfo = ref({})

        const updateAuthInfo = (data: any) => {
            authInfo.value = data
        }

        return {
            authInfo,
            updateAuthInfo
        }
    },
    {
        // persist: true,
        persist: {
            key: "user-auth",
            pick: ["authInfo"],
        },
    },
)
